package com.wego.ex;

import com.wego.bean.ResultBean;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 *
 * @author hc
 * @date 2025-09-09 11:07
 */
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(GlobalException.class)
    public ResultBean<Void> handleGlobalException(GlobalException e) {
        return ResultBean.error(e.getCode(), e.getMsg(), null);
    }

}
